package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the DIRECCION database table.
 * 
 */
@Entity
@Table(name="DIRECCION")
public class Direccion implements Serializable {
	private static final long serialVersionUID = 1L;
	private long personaId;
	private String codPost;
	private String dptoId;
	private String lugExt;
	private String noDist;
	private String nomNumVia;
	private String paisId;
	private String provId;
	private Persona persona;

    public Direccion() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="PERSONA_ID", unique=true, nullable=false)
	public long getPersonaId() {
		return this.personaId;
	}

	public void setPersonaId(long personaId) {
		this.personaId = personaId;
	}


	@Column(name="COD_POST", length=12)
	public String getCodPost() {
		return this.codPost;
	}

	public void setCodPost(String codPost) {
		this.codPost = codPost;
	}


	@Column(name="DPTO_ID", length=2)
	public String getDptoId() {
		return this.dptoId;
	}

	public void setDptoId(String dptoId) {
		this.dptoId = dptoId;
	}


	@Column(name="LUG_EXT", length=30)
	public String getLugExt() {
		return this.lugExt;
	}

	public void setLugExt(String lugExt) {
		this.lugExt = lugExt;
	}


	@Column(name="NO_DIST", length=40)
	public String getNoDist() {
		return this.noDist;
	}

	public void setNoDist(String noDist) {
		this.noDist = noDist;
	}


	@Column(name="NOM_NUM_VIA", nullable=false, length=40)
	public String getNomNumVia() {
		return this.nomNumVia;
	}

	public void setNomNumVia(String nomNumVia) {
		this.nomNumVia = nomNumVia;
	}


	@Column(name="PAIS_ID", nullable=false, length=2)
	public String getPaisId() {
		return this.paisId;
	}

	public void setPaisId(String paisId) {
		this.paisId = paisId;
	}


	@Column(name="PROV_ID", length=2)
	public String getProvId() {
		return this.provId;
	}

	public void setProvId(String provId) {
		this.provId = provId;
	}


	//bi-directional one-to-one association to Persona
	@OneToOne
	@JoinColumn(name="PERSONA_ID", nullable=false, insertable=false, updatable=false)
	public Persona getPersona() {
		return this.persona;
	}

	public void setPersona(Persona persona) {
		this.persona = persona;
	}
	
}